<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
    <!-- 1、引入bs的css样式-->
    <link rel="stylesheet" href="webjars/bootstrap/3.4.1/css/bootstrap.min.css">
    <!-- 2、引入jquery依赖-->
    <script src="webjars/jquery/3.6.0/jquery.min.js"></script>
    <!--  3、引入bs的js库-->
    <script src="webjars/bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <!--  4、格式  -->
    <style>
        .container {
            width: 600px;
            margin-top: 20px;
        }
    </style>
</head>
<body>

<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">文件上传</h3>
        </div>
        <div class="panel-body">
            <!--    添加表单    -->
            <!--    文件上传重点  : method="post" enctype="multipart/form-data"   -->
            <!--    地址：action="/user/upload.do"        -->
            <form action="/user/upload.do" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label>选择要上传的文件</label>
                    <input type="file" name="mfile">
                    <p class="help-block">选择想要上传的文件</p>
                </div>
                <button type="submit" class="btn btn-default">上传</button>
            </form>
        </div>
        <div class="panel-footer text-right">
            文件上传测试
        </div>
    </div>
</div>

</body>
</html>